package com.zut.questionnaire.pojo;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@Entity
public class Questionnaire implements Serializable {

    @Id
    private String id; //问卷id

    private String name; //问卷名

    private String instruction; //问卷说明

    private String userId; //创建者id

    private LocalDateTime creationDate; //创建时间

    @OneToMany(cascade = CascadeType.ALL,orphanRemoval = true)
    @JoinColumn(name = "questionnaireId")
    private List<Question> questionList;


}
